package kr.hkit.powerjava.chther05.work;

import java.util.Scanner;

public class Exercise {
	public static void main(String[] args) {
		int a,b,c,d,e,f,g,h,i;
		Scanner in =new Scanner(System.in);
		a=in.nextInt();
		b=in.nextInt();
		c=in.nextInt();
		d=in.nextInt();
		e=in.nextInt();
		f=in.nextInt();
		g=in.nextInt();
		h=in.nextInt();
		i=in.nextInt();
		System.out.println(a>=3 && b >= 40 && c>=3);
		System.out.println((d<=6 && e >= 150) || f<=150);
		System.out.println(g>=3.0 && (h>= 300 || i>=700));
		
	}
}
